import request from '@/utils/request'

//添加订单
export const addOrderService = (params: any) => {
    return request.post('/order/addOrder', params);
}

//删除订单
export const deleteOrderService = (params: any) => {
    return request.post('/order/deleteOrder', params);
}

//更新订单
export const updateOrderService = (data: any) => {
    return request.post('/order/updateOrder', null, {params: data});
}

//获取订单
export const getAllOrdersService = (params: any) => {
    return request.get('/order/gotDataByPage',  {params:params});
}

//获取订单(商家版)
export const getAllOrdersBusinessService = (params: any) => {
    return request.get('/order/gotDataByPageBusiness',  {params:params});
}

//获取商家的总销售价格
export const getTotalSalesPrice = () => {
    return request.get('/order/gotTotalSalesPrice');
}

//获取商家的总销售数量
export const getTotalSalesNum = () => {
    return request.get('/order/gotTotalSalesNum');
}

//获取商家过去六个月的销售价格
export const getSixMonthSalesPrice = () => {
    return request.get('/order/gotSixMonthSalesPrice');
}

//获取商家过去六个月的销售数量
export const getSixMonthSalesNum = () => {
    return request.get('/order/gotSixMonthSalesNum');
}